﻿@model PagingDataSet<MicroblogEntity>
@{
    Layout = "app-list-2cols";
    
    bool showNavigation = false;
    if (UserContext.CurrentUser != null && UserContext.CurrentUser.UserName == Url.SpaceKey())
    {
        showNavigation = true;
    }
    Html.ViewContext.RouteData.Values["ShowNavigation"] = showNavigation;

    Html.IncludeCss("~/Applications/Microblog/Styles/app.css", ResourceRenderPriority.Last);
    Html.IncludeScript("~/Applications/Microblog/Scripts/tunynet/jquery.spb.microblog.List.js", ResourceRenderPriority.Last);
}
@section Aside{
    @Html.Action("_TopTopics", "ChannelMicroblog", new { topNum = 10 })
}
<div class="tn-box tn-widget tn-widget-content tn-corner-all spb-microblog-atme">
    <div class="tn-box-content tn-widget-content tn-corner-all">
        <div class="spb-microblog-atme-wrap">
            <div class="tn-main-heading tn-border-gray tn-border-bottom">
                <h2>
                    提到我的微博
                    @if (Model != null && Model.TotalRecords > 0)
                    { 
                        @("（共" + Model.TotalRecords + "条）")
                    }
                </h2>
            </div>
            @if (Model != null && Model.Count() > 0)
            { 
                <ul class="tn-list tnc-dynamic">
                    @foreach (var microblog in Model)
                    {
                        @Html.Partial("~/Applications/Microblog/Views/MicroblogActivity/_Microblog.cshtml", microblog)
                    }
                </ul>
                <div class="tn-pagination">
                    @Html.PagingButton(Model, PaginationMode.NumericNextPrevious)
                </div>
            }
            else
            {
                <div class="tn-no-data">
                    还没有提到过</div>
            }
        </div>
    </div>
</div>
